/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pras.skripsi;

import java.util.Random;

/**
 *
 * @author Pras
 */
public class RandomFactory {

    private RandomFactory() {
    }

    public static int getRandom() {
        Random rand = new Random();
        int randomNum = rand.nextInt((3 - 0) + 1) + 0;

        return randomNum;
    }

    public static RandomFactory getInstance() {
        return RandomFactoryHolder.INSTANCE;
    }

    private static class RandomFactoryHolder {

        private static final RandomFactory INSTANCE = new RandomFactory();
    }
}
